package com.qf.mapper;

import com.qf.model.Branch;
import com.qf.model.Project;
import com.qf.model.Stage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BranchMapper {

    @Select("select * from branch where status =1")
    public List<Branch> findAll();

    //当前页结果
    public List<Branch> findPage(@Param("currentPage")Integer currentPage, @Param("pageSize")Integer pageSize, @Param("queryString")String queryString);


    //总记录数

    public Long count(String queryString);

    //添加一个branch
    public int addOne(Branch branch);

    //根据bid查询branch
    public Branch findById(String bid);

    //修改branch
    int editOne(Branch branch);

    //删除branch
    int delete(String sid);

    @Select("select * from branch where pid=#{pid} and status=1")
    List<Branch> findByPid(int pid);


}
